<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/taglibs.jsp"%>
	<center>
		<div id="showDetailDiv">
			<table>
				<tr>
					<td align="center">
						<div>
							<h2 style="text-align: center">投票状态</h2>
						</div>
						<div style="width: auto;">
							<!----- 饼图展示区域----->
							<table style="height: 300px">
								<tr>
									<td align="left">
										<div
											style="margin-right: auto; width: auto; height: 200px; top: 180px;">
											<span>总人数: </span>&nbsp;&nbsp;
											<div
												style="display: inline; background-color: firebrick; height: 20px"
												class="animateTest totalPhoto"></div>
											<span class="totalPersentage"></span><span
												class="totalNum"></span>
											<p></p>
											<span>已投票: </span>&nbsp;&nbsp;
											<div
												style="display: inline; background-color: #69D2E7; height: 20px"
												class="animateTest votedPhoto"></div>
											<span class="votedPersentage"></span><span
												class="votedNum"></span>
											<p></p>
											<span>未投票: </span>&nbsp;&nbsp;
											<div
												style="display: inline; background-color: #F38630; height: 20px"
												class="animateTest nonVotedPhoto"></div>
											<span class=nonVotedPersentage></span><span
												class="nonVotedNum"></span>
										</div>
									</td>
									<td>
										<div>
											<canvas id="myChart" height="200px"
												style="top:180px;left:800px"></canvas>
										</div>
									</td>
								</tr>
							</table>
						</div>
					</td>
				</tr>
				<tr>
					<td align="center">
						<!------ 报表汇总数据区域----->
						<table id="detailMessage" class="list_grid"
							style="border-spacing: 0;">
							<thead>
								<tr>
									<th><font size="4">用户投票结果统计</font></th>
								</tr>
							</thead>
						</table>
					</td>
				</tr>
				<tr>
					<td>
						<table class="list_grid no-hover" style="border-spacing: 0;"  id="tDetailMessage">
						</table>
					</td>
				</tr>
				<tr>
					<td align="left">
						<!------ 表头查询区域----->
						<div>
							<!-- 由于下载采用submit方式向后台提交数据，点击回车后导出和查询功能冲突，则用了两个form ---查询 -->
							<div class="list_query">
							   <label>
										<span>USERNAME</span> 
										<input id="survey_Name" name="survey_Name" placeholder="请输入USERNAME" type=text  style="margin-top:10px;width:200px;font-size:15px"/> 
										<input id="survey_Id" name="survey_Id" type="hidden" value="${survey.id}" /> </label>
									 <label>	<span>STATUS</span>  &nbsp;&nbsp;&nbsp;&nbsp;
										<select id="survey_Status" name="survey_Status" 
										style="width:220px;height:32px;font-size:15px">
											<option value="-1">请选择STATUS</option>
											<option value="0">未投票</option>
											<option value="1">已投票</option>
									    </select></label>
							</div>
							<!-- 由于下载采用submit方式向后台提交数据，点击回车后导出和查询功能冲突，则用了两个form --导出-->
							<div class="list_query" style="display: none;">
								<form  action="${ctx}/survey/surveyStatistics/userAnswerStatus/answerExport.do"
									method="post" id="queryForm">
									<input id="surveyE_Name" name="userName" type="hidden" />
									<input id="surveyE_Id " name="surveyId" type="hidden"
										value="${survey.id}" /> <input type="hidden"
										id="surveyE_Status" name="status">
									<input type="hidden" name="userAnswerStatus" id="userAnswerStatus" >
								</form>
							</div>
							<div class="list_toolbar divToolbar">
								<div class="toolButton divButton" id="searchData"
									onclick="search()">查询</div>
							</div>
						</div>
					</td>
				</tr>
				<!-- 表头区域 -->
				<tr>
					<td>
						<table class="list_grid" style="border-spacing: 1">
							<thead id="questionContent">
								<tr>
									<th style="width: 30px" align="left">NO</th>
									<th style="width: auto" align="center">USERNAME</th>
									<th style="width: auto" align="center">CN_NAME</th>
									<th style="width: auto" align="center">EMAIL</th>
									<th style="width: auto" align="center">DEPT_NAME</th>
									<th style="width: 60px" align="center">STATUS</th>
									<th style="width: auto" align="center">CREATE_TIME</th>
									<th style="width: 1px;" align="center"></th>
								</tr>
							</thead>
							<!-- <tbody id="tBodyListForContent" ></tbody> -->
						</table>
					</td>
				</tr>
				<!-- 数据区域 -->
				<tr>
					<td>
						<div class="list_scrollControlDiv">
							<table class="list_grid" style="border-spacing: 0;">
								<tbody id="tBodyListForContent">
								</tbody>
							</table>
						</div>
					</td>
				</tr>
				<!-- 分页控件区域 -->
				<tr>
					<td>
						<div id="pagination_Tab2" class="pagination"></div>
					</td>
				</tr>
				<tr>
					<td align="center" style="margin-top:10px;">										
					<form class="export-form">
					<% 
					String autho = (String)session.getAttribute("SESSION_AUTHORITY");
					if(autho!=null && autho.indexOf("admin")>=0){
 					%>
					<div class="toolButton divButton" id="dowmload" onclick="exportExcel()">导出</div>
					<div class="toolButton" onclick="reBack()" align="center" >返回</div>		
					<%} %>		
					</form>										
					</td>
				</tr>
			</table>
		</div>
	</center>
<script type="text/javascript" src="${ctx}/res/js/common/Chart.js"></script>
<script type="text/javascript" src="${ctx}/res/js/survey/surveyStatistics/surveyResultStatistics_Tab2.js"></script>